﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class Thunder : GameItem,iDame {

	[SerializeField] Animator anim;
	[SerializeField] AnimationClip thunderClip;

	private void OnEnable()
	{
		InvokeRepeating ("Thundering", 2, 1.5f);
	}
	private void Thundering()
	{
		anim.Play (thunderClip.name);
	}

	public override void CharCollision ()
	{
		GameController.IsGameComplete = false;
		GameController.gameStage = GameStage.GAMEOVER;
		MusicController.PlayClip (Random.Range(4,9));
	}
}
